package com.wangjiyuan.giftshuo.http.classityretrofitinterface;

import android.content.Intent;

import com.wangjiyuan.giftshuo.bean.classifybean.shop.ShopDetLayoutBean;
import com.wangjiyuan.giftshuo.bean.classifybean.shop.TreeBean;
import com.wangjiyuan.giftshuo.bean.classifybean.strategy.ColumnBean;
import com.wangjiyuan.giftshuo.bean.classifybean.strategy.GroupBean;
import com.wangjiyuan.giftshuo.bean.classifybean.strategy.GroupDetailsBean;
import com.wangjiyuan.giftshuo.config.classify.ClassifyURL;

import java.util.Map;

import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by QXL on 2016/11/15.
 */

public interface RetrofitInterface {
    /**
     * 攻略界面的url
     * @param channel_groups
     * @param all
     * @return
     */
//    品类、风格、对象
    @GET(ClassifyURL.GROUP_PATH)
    Observable<GroupBean> getGroupObservable(@Path("channel_groups") String channel_groups, @Path("all") String all);
    //点击进入详情画面
    @GET(ClassifyURL.GROUP_DETAILS_PATH)
    Observable<GroupDetailsBean> getGroupDetailObservable(@Path("id") int id, @Query("limit") int limit,
                                                                             @Query("offset") int offset, @Query("order_by") String order_by);

//    栏目
    @GET(ClassifyURL.COLUMNS_URL)
    Observable<ColumnBean> getColumObservable();
    //点击查看全部
    @GET(ClassifyURL.COLUMNS_URL)
    Observable<ColumnBean> getColumDetailsObservable(@Query("limit") int limit,@Query("offset") int offset);



    /**
     * 单品界面的url
     * @return
     */
    @GET(ClassifyURL.TREE_PATH)
    Observable<TreeBean> getTreeObservable();

//    单品item布局的url：http://api.liwushuo.com/v2/item_subcategories/7/items?limit=20&offset=0
    @GET(ClassifyURL.SHOP_DET_LAYOUT_PATH)
    Observable<ShopDetLayoutBean> getShopDetLayoutObservable(@Path("id") int id, @QueryMap Map<String,Integer> paramsMap);

}
